package com.fy.service.mapper;


import com.fy.order.dto.TravelOrderDto;
import com.fy.service.entity.FindOrderEntity;
import com.fy.service.entity.TravelOrderEntity;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.List;

@Mapper
public interface TravelOrderMapper {

    //添加travel_order门票订单信息
    TravelOrderDto addTravelOrder(TravelOrderEntity travelOrderEntity);

    //通过id查看travel_order订单
    TravelOrderDto travelOrderFindById(int travelOrderId);

    //查看全部travel_order订单
    List<TravelOrderDto> travelOrderFindAll();

    //查询订单条件查
    TravelOrderDto findTravelOrder(FindOrderEntity findOrderEntity);

    //修改travel_order订单信息
    Boolean updateTravelOrder(@RequestBody TravelOrderEntity travelOrderEntity);

    //抢单
    TravelOrderDto grabTravelOrder(int travelOrderId, int businessId);

    //修改travel_order订单状态
    TravelOrderDto updateTravelOrderState(int travelOrderId, int orderState);

    //删除travel_order订单
    int deleteTravelOrderState(int travelOrderId);

    //支付
    TravelOrderDto payTravelOrderState(int travelOrderId, int orderState);
}
